using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using QuanLyHocPhi.Model.Mapping;

namespace QuanLyHocPhi.Model
{
    public partial class QLHPEntities : DbContext
    {
        static QLHPEntities()
        {
            Database.SetInitializer<QLHPEntities>(new CreateDatabaseIfNotExists<QLHPEntities>());
        }

        //public QLHPEntities()
        //    : base("Name=QLHPEntities")
        //{

        //}

        public DbSet<BienCheSinhVienVaoHocKy> BienCheSinhVienVaoHocKiDbSet { get; set; }
        public DbSet<HocKy> HocKyDbSet { get; set; }
        public DbSet<LoaiHinhDaoTao> LoaiHinhDaoTaoDbSet { get; set; }
        public DbSet<LopGoc> LopGocDbSet { get; set; }
        public DbSet<NamHoc> NamHocDbSet { get; set; }
        public DbSet<NguoiSuDung> NguoiSuDungDbSet { get; set; }
        public DbSet<PhieuThu> PhieuThuDbSet { get; set; }
        public DbSet<PhiMacDinh> PhiMacDinhDbSet { get; set; }
        public DbSet<SinhVien> SinhVienDbSet { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new BienCheSinhVienVaoHocKyMap());
            modelBuilder.Configurations.Add(new HocKyMap());
            modelBuilder.Configurations.Add(new LoaiHinhDaoTaoMap());
            modelBuilder.Configurations.Add(new LopGocMap());
            modelBuilder.Configurations.Add(new NamHocMap());
            modelBuilder.Configurations.Add(new NguoiSuDungMap());
            modelBuilder.Configurations.Add(new PhieuThuMap());
            modelBuilder.Configurations.Add(new PhiMacDinhMap());
            modelBuilder.Configurations.Add(new SinhVienMap());
        }
    }
}
